package cn.lut.mvc.config;

import cn.lut.entity.Admin;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.List;

/**
 * @user:dell
 * @date:2020年11月24 16:34
 */
public class SecurityAdmin extends User {
//    原始的admin对象
    private Admin originalAdmin;
    public SecurityAdmin(Admin originalAdmin, List<GrantedAuthority> authorities) {
      super(originalAdmin.getLoginAcct(),originalAdmin.getUserPswd(),authorities);
//      给本类的this.originalAdmin赋值
        this.originalAdmin=originalAdmin;
    }
    public Admin getOriginalAdmin(){
        return originalAdmin;
    }

}
